package sinkdotcom1;

//import java.util.Scanner;
public class SimpleDotCom {

    //public static void main(String[] args) {
    //Scanner input = new Scanner (System.in);
    //guess[0] = input.nextString();
    int[] locationCells;
    int numOfHits;
    //int[] Dotlocations = new int [3];

    public void setLocationsCells(int[] locs) {
        locationCells = locs;
    }

    public String checkYourself(String stringGuess) {
        int guess = Integer.parseInt(stringGuess);
        String result = "miss";
        for (int cell : locationCells) {
            if (guess == cell) {
                result = "hit";
                numOfHits++;
                break;
            }
        }
        if (numOfHits == locationCells.length) {
            result = "kill";
        }
        System.out.println(result);
        return result;
    }
}
